package a.j;

import javax.swing.*;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.geom.Point2D;
import java.awt.geom.Point2D.Double;
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import java.net.URL;
import java.util.Dictionary;
import java.util.Hashtable;

public class sg
  extends JPanel
{
  public static final byte a = 0;
  public static final byte b = 1;
  public static final byte c = 2;
  public static final byte d = 3;
  public static final String e = "NavigationComponent.ScrollTimerDelay";
  public static final String f = "NavigationComponent.ScrollTimerInitialDelay";
  public static final String g = "NavigationComponent.ZoomTimerDelay";
  public static final String h = "NavigationComponent.ZoomTimerInitialDelay";
  protected static final byte i = 1;
  protected static final byte j = 2;
  protected static final byte k = 4;
  protected static final byte l = 8;
  protected final pg m;
  private boolean n = true;
  private boolean o = true;
  private boolean p = true;
  private boolean q;
  private boolean r = true;
  private double s = 10.0D;
  private boolean t = true;
  private byte u = 0;
  private boolean v;
  private double w = 15.0D;
  private double x = 0.1D;
  private double y = 1.1D;
  private final int z = 100;
  private JSlider A;
  static Class B;
  public static int C;
  
  public sg(pg parampg)
  {
    this.m = parampg;
    setCursor(Cursor.getDefaultCursor());
    setLayout(new GridBagLayout());
    setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
    setOpaque(false);
    Color localColor = getBackground();
    setBackground(new Color(localColor.getRed(), localColor.getGreen(), localColor.getBlue(), 0));
    a();
  }
  
  protected void paintComponent(Graphics paramGraphics)
  {
    super.paintComponent(paramGraphics);
    if (!ld.E)
    {
      if (getBackground() != null) {
        paramGraphics.setColor(getBackground());
      }
    }
    else {
      paramGraphics.fillRect(0, 0, getWidth(), getHeight());
    }
  }
  
  protected void a()
  {
    boolean bool = ld.E;
    removeAll();
    byte b1 = n();
    GridBagConstraints localGridBagConstraints = new GridBagConstraints();
    if (!bool) {
      if (this.n)
      {
        if (!bool) {}
        localGridBagConstraints.gridx = (b1 == 3 ? 5 : 1);
        if (!bool) {}
        localGridBagConstraints.gridy = (b1 == 2 ? 4 : 0);
        add(a((byte)1), localGridBagConstraints);
        if (!bool) {}
        localGridBagConstraints.gridx = (b1 == 3 ? 6 : 2);
        if (!bool) {}
        localGridBagConstraints.gridy = (b1 == 2 ? 5 : 1);
        add(a((byte)4), localGridBagConstraints);
        if (!bool) {}
        localGridBagConstraints.gridx = (b1 == 3 ? 5 : 1);
        if (!bool) {}
        localGridBagConstraints.gridy = (b1 == 2 ? 6 : 2);
        add(a((byte)2), localGridBagConstraints);
        if (!bool) {}
        localGridBagConstraints.gridx = (b1 == 3 ? 4 : 0);
        if (!bool) {}
        localGridBagConstraints.gridy = (b1 == 2 ? 5 : 1);
        add(a((byte)8), localGridBagConstraints);
        if (bool) {
          break label292;
        }
        if (this.r)
        {
          if (!bool) {}
          localGridBagConstraints.gridx = (b1 == 3 ? 5 : 1);
          if (!bool) {}
          localGridBagConstraints.gridy = (b1 == 2 ? 5 : 1);
          add(b(), localGridBagConstraints);
        }
      }
    }
    label292:
    if (!bool) {
      if (this.o)
      {
        if (!bool) {
          if (b1 != 3) {
            if (bool) {
              break label322;
            }
          }
        }
        label322:
        localGridBagConstraints.gridx = (b1 == 1 ? 3 : 1);
        if (!bool) {
          if (b1 != 2) {
            if (bool) {
              break label350;
            }
          }
        }
        label350:
        localGridBagConstraints.gridy = (b1 == 0 ? 3 : 4);
        JPanel localJPanel = new JPanel();
        localJPanel.setOpaque(false);
        localJPanel.setBackground(null);
        add(localJPanel, localGridBagConstraints);
        if (!bool) {
          if (bool) {
            break label408;
          }
        }
        localGridBagConstraints.gridx = (b1 == 1 ? 6 : b1 == 3 ? 2 : 1);
        if (!bool) {}
        if (!bool) {}
        localGridBagConstraints.gridy = (b1 == 2 ? 0 : b1 == 0 ? 4 : 1);
        add(a(true), localGridBagConstraints);
        if (!bool) {
          if (bool) {
            break label483;
          }
        }
        label483:
        localGridBagConstraints.gridx = (b1 == 1 ? 4 : b1 == 3 ? 0 : 1);
        if (!bool) {}
        if (!bool) {}
        localGridBagConstraints.gridy = (b1 == 2 ? 2 : b1 == 0 ? 6 : 1);
        add(a(false), localGridBagConstraints);
      }
    }
    label408:
    if (this.p)
    {
      if (!bool) {
        if (bool) {
          break label566;
        }
      }
      label566:
      localGridBagConstraints.gridx = (b1 == 1 ? 5 : b1 == 3 ? 1 : 1);
      if (!bool) {}
      localGridBagConstraints.gridy = (b1 == 0 ? 5 : 1);
      localGridBagConstraints.weighty = (((!bool) && (b1 == 0)) || (b1 == 2) ? 1.0D : 0.0D);
      localGridBagConstraints.weightx = ((bool) || ((b1 == 1) || (b1 == 3)) ? 1.0D : 0.0D);
      if (!bool) {
        if (b1 != 1) {
          if (bool) {
            break label667;
          }
        }
      }
      label667:
      if (!bool) {}
      localGridBagConstraints.gridwidth = (this.q ? 3 : b1 == 3 ? 1 : 1);
      if (!bool) {
        if (b1 != 0) {
          if (bool) {
            break label711;
          }
        }
      }
      label711:
      if (!bool) {}
      localGridBagConstraints.gridheight = (this.q ? 3 : b1 == 2 ? 1 : 1);
      localGridBagConstraints.fill = 1;
      this.A = d(b1);
      add(this.A, localGridBagConstraints);
    }
  }
  
  protected JButton a(byte paramByte)
  {
    Action localAction = b(paramByte);
    JButton localJButton = new JButton(localAction);
    localJButton.addMouseListener(new d_(localAction, "NavigationComponent.ScrollTimerDelay", "NavigationComponent.ScrollTimerInitialDelay"));
    localJButton.setContentAreaFilled(false);
    localJButton.setMargin(new Insets(0, 0, 0, 0));
    return localJButton;
  }
  
  protected Action b(byte paramByte)
  {
    return new h_(paramByte, c(paramByte));
  }
  
  protected Icon c(byte paramByte)
  {
    boolean bool2 = ld.E;
    boolean bool1 = ld.D;
    String str = "";
    if (!bool2) {}
    switch (paramByte)
    {
    case 1: 
    case 3: 
    case 5: 
    case 6: 
    case 7: 
    default: 
      str = "resource/nav_up.png";
      if (!bool2) {
        if (!bool1) {
          break label106;
        }
      }
    case 4: 
      str = "resource/nav_right.png";
      if (!bool2) {
        if (!bool1) {
          break label106;
        }
      }
    case 2: 
      if (!bool2)
      {
        str = "resource/nav_down.png";
        if (!bool1) {
          break label106;
        }
      }
      break;
    }
    str = "resource/nav_left.png";
    label106:
    URL localURL = a(str);
    if (localURL != null) {
      return new ImageIcon(localURL);
    }
    new Icon()
    {
      private final byte val$direction;
      
      public void paintIcon(Component paramAnonymousComponent, Graphics paramAnonymousGraphics, int paramAnonymousInt1, int paramAnonymousInt2)
      {
        boolean bool2 = ld.E;
        boolean bool1 = ld.D;
        paramAnonymousGraphics = paramAnonymousGraphics.create();
        paramAnonymousGraphics.setColor(Color.white);
        paramAnonymousGraphics.fillRect(paramAnonymousInt1 + 1, paramAnonymousInt2 + 1, 14, 14);
        paramAnonymousGraphics.setColor(Color.black);
        ((Graphics2D)paramAnonymousGraphics).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        Polygon localPolygon = new Polygon();
        if (!bool2) {
          switch (this.val$direction)
          {
          case 1: 
          case 3: 
          case 5: 
          case 6: 
          case 7: 
          default: 
            localPolygon.addPoint(paramAnonymousInt1 + 4, paramAnonymousInt2 + 12);
            localPolygon.addPoint(paramAnonymousInt1 + 12, paramAnonymousInt2 + 12);
            localPolygon.addPoint(paramAnonymousInt1 + 8, paramAnonymousInt2 + 2);
            if (bool2) {
              return;
            }
            if (!bool1) {
              break;
            }
          case 4: 
            localPolygon.addPoint(paramAnonymousInt1 + 4, paramAnonymousInt2 + 4);
            localPolygon.addPoint(paramAnonymousInt1 + 4, paramAnonymousInt2 + 12);
            localPolygon.addPoint(paramAnonymousInt1 + 14, paramAnonymousInt2 + 8);
            if (bool2) {
              return;
            }
            if (!bool1) {
              break;
            }
          case 2: 
            localPolygon.addPoint(paramAnonymousInt1 + 4, paramAnonymousInt2 + 4);
            localPolygon.addPoint(paramAnonymousInt1 + 12, paramAnonymousInt2 + 4);
            localPolygon.addPoint(paramAnonymousInt1 + 8, paramAnonymousInt2 + 14);
            if (bool2) {
              return;
            }
            if (!bool1) {
              break;
            }
          case 8: 
            localPolygon.addPoint(paramAnonymousInt1 + 12, paramAnonymousInt2 + 4);
            localPolygon.addPoint(paramAnonymousInt1 + 12, paramAnonymousInt2 + 12);
          }
        } else {
          localPolygon.addPoint(paramAnonymousInt1 + 2, paramAnonymousInt2 + 8);
        }
        paramAnonymousGraphics.fillPolygon(localPolygon);
        paramAnonymousGraphics.dispose();
      }
      
      public int getIconWidth()
      {
        return 16;
      }
      
      public int getIconHeight()
      {
        return 16;
      }
    };
  }
  
  protected JButton b()
  {
    Action localAction = c();
    JButton localJButton = new JButton(localAction);
    localJButton.setContentAreaFilled(false);
    localJButton.setMargin(new Insets(0, 0, 0, 0));
    return localJButton;
  }
  
  protected Action c()
  {
    return new e_(d());
  }
  
  protected Icon d()
  {
    URL localURL = a("resource/nav_fit.png");
    if (localURL != null) {
      return new ImageIcon(localURL);
    }
    new Icon()
    {
      public void paintIcon(Component paramAnonymousComponent, Graphics paramAnonymousGraphics, int paramAnonymousInt1, int paramAnonymousInt2)
      {
        paramAnonymousGraphics = paramAnonymousGraphics.create();
        paramAnonymousGraphics.setColor(Color.white);
        paramAnonymousGraphics.fillRect(paramAnonymousInt1 + 1, paramAnonymousInt2 + 1, 14, 14);
        paramAnonymousGraphics.setColor(Color.black);
        ((Graphics2D)paramAnonymousGraphics).setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        paramAnonymousGraphics.fillOval(paramAnonymousInt1 + 2, paramAnonymousInt2 + 2, 12, 12);
        paramAnonymousGraphics.dispose();
      }
      
      public int getIconWidth()
      {
        return 16;
      }
      
      public int getIconHeight()
      {
        return 16;
      }
    };
  }
  
  protected JButton a(boolean paramBoolean)
  {
    Action localAction = b(paramBoolean);
    JButton localJButton = new JButton(localAction);
    localJButton.addMouseListener(new d_(localAction, "NavigationComponent.ZoomTimerDelay", "NavigationComponent.ZoomTimerInitialDelay"));
    localJButton.setContentAreaFilled(false);
    localJButton.setMargin(new Insets(0, 0, 0, 0));
    return localJButton;
  }
  
  protected Action b(boolean paramBoolean)
  {
    double d1 = j();
    double d2 = paramBoolean ? d1 : 1.0D / d1;
    return new f_(d2, c(paramBoolean));
  }
  
  protected Icon c(boolean paramBoolean)
  {
    boolean bool = ld.E;
    String str = "";
    if (!bool)
    {
      if (paramBoolean)
      {
        if (bool) {
          break label33;
        }
        str = "resource/nav_plus.png";
      }
    }
    else {
      if (!ld.D) {
        break label34;
      }
    }
    label33:
    str = "resource/nav_minus.png";
    label34:
    URL localURL = a(str);
    if (localURL != null) {
      return new ImageIcon(localURL);
    }
    new Icon()
    {
      private final boolean val$zoomIn;
      
      public void paintIcon(Component paramAnonymousComponent, Graphics paramAnonymousGraphics, int paramAnonymousInt1, int paramAnonymousInt2)
      {
        boolean bool = ld.E;
        paramAnonymousGraphics = paramAnonymousGraphics.create();
        paramAnonymousGraphics.setColor(Color.white);
        paramAnonymousGraphics.fillRect(paramAnonymousInt1 + 1, paramAnonymousInt2 + 1, 14, 14);
        if (!bool)
        {
          paramAnonymousGraphics.setColor(Color.black);
          if (this.val$zoomIn)
          {
            paramAnonymousGraphics.drawLine(paramAnonymousInt1 + 8, paramAnonymousInt2 + 4, paramAnonymousInt1 + 8, paramAnonymousInt2 + 12);
            paramAnonymousGraphics.drawLine(paramAnonymousInt1 + 4, paramAnonymousInt2 + 8, paramAnonymousInt1 + 12, paramAnonymousInt2 + 8);
            if (bool) {
              return;
            }
            if (!ld.D) {
              break label125;
            }
          }
        }
        paramAnonymousGraphics.drawLine(paramAnonymousInt1 + 4, paramAnonymousInt2 + 8, paramAnonymousInt1 + 12, paramAnonymousInt2 + 8);
        label125:
        paramAnonymousGraphics.dispose();
      }
      
      public int getIconWidth()
      {
        return 16;
      }
      
      public int getIconHeight()
      {
        return 16;
      }
    };
  }
  
  protected JSlider d(byte paramByte)
  {
    boolean bool = ld.E;
    double d1 = m();
    double d2 = l();
    int i1 = (int)Math.floor(Math.log(d1) / Math.log(10.0D) * 100.0D);
    int i2 = (int)Math.ceil(Math.log(d2) / Math.log(10.0D) * 100.0D);
    JSlider localJSlider = new JSlider(1, i1, i2, i1 <= 1 ? 1 : i1);
    localJSlider.setOpaque(false);
    localJSlider.setBackground(null);
    localJSlider.setMajorTickSpacing(1000);
    localJSlider.setMinorTickSpacing(100);
    localJSlider.setSnapToTicks(false);
    localJSlider.setOpaque(false);
    localJSlider.setPaintTicks(this.q);
    localJSlider.setPaintLabels(this.q);
    if (!bool) {
      if (this.q)
      {
        localObject = new Hashtable();
        ((Hashtable)localObject).put(new Integer(0), new JLabel("1.0"));
        ((Hashtable)localObject).put(new Integer(i1), new JLabel(String.valueOf(d1)));
        ((Hashtable)localObject).put(new Integer(i2), new JLabel(String.valueOf(d2)));
        localJSlider.setLabelTable((Dictionary)localObject);
      }
    }
    if (!bool) {
      if (paramByte != 1)
      {
        if (!bool) {
          if (paramByte != 3) {
            break label306;
          }
        }
      }
      else
      {
        localJSlider.setOrientation(0);
        if (bool) {
          break label326;
        }
        localJSlider.setPreferredSize(new Dimension(100, (int)localJSlider.getPreferredSize().getHeight()));
      }
    }
    if (ld.D) {
      label306:
      label326:
      localJSlider.setPreferredSize(new Dimension((int)localJSlider.getPreferredSize().getWidth(), 100));
    }
    Object localObject = new g_(null);
    localJSlider.addChangeListener((ChangeListener)localObject);
    i_ locali_ = new i_(localJSlider);
    this.m.B().addPropertyChangeListener("Zoom", locali_);
    return localJSlider;
  }
  
  private URL a(String paramString)
  {
    boolean bool = ld.E;
    if (!bool) {}
    Class localClass = B == null ? (sg.B = b("a.j.sg")) : B;
    URL localURL1 = localClass.getResource(paramString);
    if (!bool) {
      if (localURL1 == null)
      {
        ClassLoader localClassLoader = localClass.getClassLoader();
        URL localURL2 = localClassLoader.getResource("y/view/" + paramString);
        if (!bool) {
          if (localURL2 == null)
          {
            Package localPackage = localClass.getPackage();
            if (!bool) {}
            String str = localPackage == null ? "" : localPackage.getName();
            if (str.length() == 0) {
              return localClassLoader.getResource(paramString);
            }
            return localClassLoader.getResource(str.replace('.', '/') + "/" + paramString);
          }
        }
        return localURL2;
      }
    }
    return localURL1;
  }
  
  public boolean e()
  {
    return this.n;
  }
  
  public void d(boolean paramBoolean)
  {
    if (!ld.E)
    {
      if (this.n != paramBoolean) {
        this.n = paramBoolean;
      }
    }
    else {
      a();
    }
  }
  
  public boolean f()
  {
    return this.r;
  }
  
  public void e(boolean paramBoolean)
  {
    if (!ld.E)
    {
      if (this.r != paramBoolean) {
        this.r = paramBoolean;
      }
    }
    else {
      a();
    }
  }
  
  public boolean g()
  {
    return this.o;
  }
  
  public void f(boolean paramBoolean)
  {
    if (!ld.E)
    {
      if (this.o != paramBoolean) {
        this.o = paramBoolean;
      }
    }
    else {
      a();
    }
  }
  
  public boolean h()
  {
    return this.p;
  }
  
  public void g(boolean paramBoolean)
  {
    if (!ld.E)
    {
      if (this.p != paramBoolean) {
        this.p = paramBoolean;
      }
    }
    else {
      a();
    }
  }
  
  public double i()
  {
    return this.s;
  }
  
  public void a(double paramDouble)
  {
    if (paramDouble != this.s)
    {
      this.s = paramDouble;
      a();
    }
  }
  
  public void b(double paramDouble)
  {
    boolean bool = ld.E;
    if (!bool)
    {
      if (paramDouble <= 1.0D) {
        throw new IllegalArgumentException("zoom factor must be greater than 1");
      }
      if (bool) {}
    }
    else
    {
      if (this.y == paramDouble) {
        return;
      }
      this.y = paramDouble;
    }
    a();
  }
  
  public double j()
  {
    return this.y;
  }
  
  public void h(boolean paramBoolean)
  {
    if (!ld.E)
    {
      if (this.q != paramBoolean) {
        this.q = paramBoolean;
      }
    }
    else {
      a();
    }
  }
  
  public boolean k()
  {
    return this.q;
  }
  
  public void c(double paramDouble)
  {
    boolean bool = ld.E;
    if (!bool)
    {
      if (this.w != paramDouble) {
        this.w = paramDouble;
      }
    }
    else
    {
      if (!bool) {
        if (this.A == null)
        {
          if (bool) {
            break label48;
          }
          a();
          if (!ld.D) {
            return;
          }
        }
      }
      label48:
      a(m(), paramDouble);
    }
  }
  
  public double l()
  {
    return this.w;
  }
  
  public void d(double paramDouble)
  {
    boolean bool = ld.E;
    if (!bool)
    {
      if (this.x != paramDouble) {
        this.x = paramDouble;
      }
    }
    else
    {
      if (!bool) {
        if (this.A == null)
        {
          if (bool) {
            break label48;
          }
          a();
          if (!ld.D) {
            return;
          }
        }
      }
      label48:
      a(paramDouble, l());
    }
  }
  
  public double m()
  {
    return this.x;
  }
  
  private void a(double paramDouble1, double paramDouble2)
  {
    int i1 = (int)Math.floor(Math.log(paramDouble1) / Math.log(10.0D) * 100.0D);
    int i2 = (int)Math.ceil(Math.log(paramDouble2) / Math.log(10.0D) * 100.0D);
    this.A.setMinimum(i1);
    this.A.setMaximum(i2);
    if (this.q)
    {
      Hashtable localHashtable = new Hashtable();
      localHashtable.put(new Integer(0), new JLabel("1.0"));
      localHashtable.put(new Integer(i1), new JLabel(String.valueOf(paramDouble1)));
      localHashtable.put(new Integer(i2), new JLabel(String.valueOf(paramDouble2)));
      this.A.setLabelTable(localHashtable);
    }
  }
  
  public byte n()
  {
    return this.u;
  }
  
  public void e(byte paramByte)
  {
    if (!ld.E)
    {
      if (this.u != paramByte) {
        this.u = paramByte;
      }
    }
    else {
      a();
    }
  }
  
  public boolean o()
  {
    return this.t;
  }
  
  public void i(boolean paramBoolean)
  {
    this.t = paramBoolean;
  }
  
  static Class b(String paramString)
  {
    try
    {
      return Class.forName(paramString);
    }
    catch (ClassNotFoundException localClassNotFoundException)
    {
      throw new NoClassDefFoundError(localClassNotFoundException.getMessage());
    }
  }
  
  private class d_
    implements MouseListener
  {
    Timer a;
    private final Action b;
    private final String c;
    private final String d;
    private final int e = 60;
    private final int f = 300;
    
    public d_(Action paramAction)
    {
      this(paramAction, null, null);
    }
    
    public d_(Action paramAction, String paramString1, String paramString2)
    {
      this.b = paramAction;
      this.c = paramString1;
      this.d = paramString2;
      this.a = new Timer(60, paramAction);
      this.a.setInitialDelay(300);
    }
    
    public void mouseEntered(MouseEvent paramMouseEvent) {}
    
    public void mouseExited(MouseEvent paramMouseEvent) {}
    
    public void mousePressed(MouseEvent paramMouseEvent)
    {
      boolean bool = ld.E;
      Object localObject;
      if (!bool)
      {
        if (this.c != null)
        {
          if (bool) {
            break label81;
          }
          if (this.c.trim().length() > 0)
          {
            if (bool) {
              break label74;
            }
            localObject = sg.this.getClientProperty(this.c);
            if ((localObject != null) && ((localObject instanceof Number))) {
              this.a.setDelay(((Number)localObject).intValue());
            }
          }
        }
        label74:
        if (bool) {
          break label143;
        }
      }
      if (this.d != null)
      {
        label81:
        if (bool) {
          break label143;
        }
        if (this.d.trim().length() > 0)
        {
          localObject = sg.this.getClientProperty(this.d);
          if (bool) {
            return;
          }
          if ((localObject != null) && ((localObject instanceof Number))) {
            this.a.setInitialDelay(((Number)localObject).intValue());
          }
        }
      }
      label143:
      this.a.start();
    }
    
    public void mouseClicked(MouseEvent paramMouseEvent)
    {
      this.b.actionPerformed(null);
    }
    
    public void mouseReleased(MouseEvent paramMouseEvent)
    {
      this.a.stop();
    }
  }
  
  private class e_
    extends AbstractAction
    implements PropertyChangeListener
  {
    private boolean a;
    private double b;
    private Point2D c;
    private boolean d;
    private boolean e;
    
    public e_(Icon paramIcon)
    {
      if (!ld.E)
      {
        if (paramIcon != null) {
          putValue("SmallIcon", paramIcon);
        }
        putValue("ShortDescription", "Toggle Fit Content");
        sg.this.m.C().addPropertyChangeListener(this);
      }
    }
    
    public void actionPerformed(ActionEvent paramActionEvent)
    {
      boolean bool = ld.E;
      this.d = true;
      Object localObject = sg.this.getClientProperty("NavigationComponent.AnimateFitContent");
      if (localObject != null) {
        this.e = "True".equalsIgnoreCase(String.valueOf(localObject));
      }
      if (!bool)
      {
        if (this.a)
        {
          sg.this.m.a(this.b, new Point2D.Double(this.c.getX(), this.c.getY()), this.e);
          this.a = false;
          sg.this.m.b();
          if (bool) {
            return;
          }
          if (!ld.D) {}
        }
        else
        {
          this.a = true;
          this.b = sg.this.m.M();
          this.c = sg.this.m.J();
          sg.this.m.e(this.e);
        }
      }
      else {
        sg.this.m.b();
      }
      this.d = false;
    }
    
    public void propertyChange(PropertyChangeEvent paramPropertyChangeEvent)
    {
      boolean bool = ld.E;
      if ((bool) || ((("Zoom".equals(paramPropertyChangeEvent.getPropertyName())) || ((bool) || (("ViewPoint".equals(paramPropertyChangeEvent.getPropertyName())) || ((bool) || ("Bounds".equals(paramPropertyChangeEvent.getPropertyName())))))) && ((bool) || (!this.d)))) {
        this.a = false;
      }
    }
  }
  
  private class f_
    extends AbstractAction
  {
    final Timer a;
    private final double c;
    
    public f_(double paramDouble, Icon paramIcon)
    {
      if (!bool)
      {
        this.c = paramDouble;
        if (paramIcon == null) {}
      }
      else
      {
        putValue("SmallIcon", paramIcon);
      }
      if (!bool) {
        if (paramDouble <= 0.0D) {
          throw new IllegalArgumentException("Zoom factor must be greater than 0. Factors between 0 and 1 will cause a zoom out, a factor greater than 1 will lead to a zoom in..");
        }
      }
      if (!bool)
      {
        if (paramDouble > 1.0D)
        {
          putValue("ShortDescription", "Zoom In");
          if (bool) {
            return;
          }
        }
      }
      else {
        if (!ld.D) {
          break label96;
        }
      }
      putValue("ShortDescription", "Zoom Out");
      label96:
      this.a = new Timer(60, this);
      this.a.setInitialDelay(300);
    }
    
    public void actionPerformed(ActionEvent paramActionEvent)
    {
      boolean bool = ld.E;
      double d1 = sg.this.m.M() * this.c;
      double d2 = sg.this.l();
      if (!bool) {
        if (d1 > d2) {
          d1 = d2;
        }
      }
      double d3 = sg.this.m();
      if (!bool)
      {
        if (d1 < d3) {
          d1 = d3;
        }
        sg.this.m.b(d1);
        sg.this.m.b();
      }
    }
  }
  
  private class h_
    extends AbstractAction
  {
    final Timer a;
    private final byte b;
    
    public h_(byte paramByte, Icon paramIcon)
    {
      if (!bool2)
      {
        this.b = paramByte;
        if (paramIcon == null) {}
      }
      else
      {
        putValue("SmallIcon", paramIcon);
      }
      if (!bool2) {}
      switch (paramByte)
      {
      case 1: 
        putValue("ShortDescription", "Navigate Up");
        if (bool2) {
          return;
        }
        if (!bool1) {
          break;
        }
      case 4: 
        putValue("ShortDescription", "Navigate Right");
        if (bool2) {
          return;
        }
        if (!bool1) {
          break;
        }
      case 2: 
      case 3: 
      case 5: 
      case 6: 
      case 7: 
      default: 
        putValue("ShortDescription", "Navigate Down");
        if (bool2) {
          return;
        }
        if (!bool1) {
          break;
        }
      case 8: 
        putValue("ShortDescription", "Navigate Left");
      }
      this.a = new Timer(30, this);
      this.a.setRepeats(true);
      this.a.setInitialDelay(300);
    }
    
    public void actionPerformed(ActionEvent paramActionEvent)
    {
      boolean bool2 = ld.E;
      boolean bool1 = ld.D;
      Point2D localPoint2D = sg.this.m.S();
      double d3 = sg.this.i();
      double d1;
      double d2;
      switch (this.b)
      {
      case 1: 
        d1 = 0.0D;
        d2 = -d3;
        if (bool2) {
          break label148;
        }
        if (!bool1) {
          break;
        }
      case 4: 
        d1 = d3;
        d2 = 0.0D;
        if (bool2) {
          break label148;
        }
        if (!bool1) {
          break;
        }
      case 2: 
      case 3: 
      case 5: 
      case 6: 
      case 7: 
      default: 
        d1 = 0.0D;
        d2 = d3;
        if (bool2) {
          break label148;
        }
        if (!bool1) {
          break;
        }
      case 8: 
        d1 = -d3;
        d2 = 0.0D;
      }
      if (!bool2)
      {
        if (sg.this.t)
        {
          label148:
          d1 /= sg.this.m.M();
          d2 /= sg.this.m.M();
        }
        sg.this.m.b(localPoint2D.getX() + d1, localPoint2D.getY() + d2);
      }
      sg.this.m.b();
    }
    
    public byte a()
    {
      return this.b;
    }
    
    public Timer c()
    {
      return this.a;
    }
  }
  
  private class g_
    implements ChangeListener
  {
    private g_() {}
    
    public void stateChanged(ChangeEvent paramChangeEvent)
    {
      if ((ld.E) || (!sg.this.v))
      {
        sg.this.v = true;
        JSlider localJSlider = (JSlider)paramChangeEvent.getSource();
        double d1 = localJSlider.getValue();
        double d2 = Math.pow(10.0D, d1 / 100.0D);
        sg.this.m.b(d2);
        sg.this.m.b();
        sg.this.v = false;
      }
    }
    
    g_(sg.1 param1)
    {
      this();
    }
  }
  
  private class i_
    implements PropertyChangeListener
  {
    private final JSlider a;
    
    public i_(JSlider paramJSlider)
    {
      this.a = paramJSlider;
    }
    
    public void propertyChange(PropertyChangeEvent paramPropertyChangeEvent)
    {
      boolean bool2 = ld.E;
      boolean bool1 = ld.D;
      if ((bool2) || ("Zoom".equals(paramPropertyChangeEvent.getPropertyName())))
      {
        double d1 = ((Double)paramPropertyChangeEvent.getNewValue()).doubleValue();
        double d2 = Math.log(d1) / Math.log(10.0D) * 100.0D;
        if (!bool2)
        {
          if (sg.this.v) {
            return;
          }
          if (!bool2) {
            sg.this.v = true;
          }
        }
        else if (d2 < this.a.getMaximum())
        {
          if (!bool2)
          {
            if (d2 > this.a.getMinimum())
            {
              this.a.setValue((int)d2);
              if (bool2) {
                break label183;
              }
              if (!bool1) {
                break label175;
              }
            }
            this.a.setValue(this.a.getMinimum());
          }
          if (bool2) {
            break label183;
          }
          if (!bool1) {
            break label175;
          }
        }
        this.a.setValue(this.a.getMaximum());
        label175:
        label183:
        sg.this.v = false;
      }
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.sg

 * JD-Core Version:    0.7.0.1

 */